package experiment3;

import java.util.Scanner;

public class No_4 {
    public static void main(String []args)
    {
        System.out.println("请输入10个数：");
        Scanner input=new Scanner(System.in);
        double[] num=new double[10];
        for(int i=0;i<10;i++)
        {
            num[i]=input.nextDouble();
        }
        System.out.println("最小元素的下标是 "+indexOfSmallestElement(num));
    }

    public static int indexOfSmallestElement(double[] array)
    {
        int l=array.length-1;
        int min_point=l;
        double min=array[l];
        while (l>=0)
        {
            if (array[l]<=min)
            {
                min=array[l];
                min_point=l;
            }
            l--;
        }
        return min_point;
    }

}
